<template>
    <div>
      <div class="container mbx">
        首页><div>{{list.name}}</div>
      </div>
      <div class="banner container">
        <BanNer></BanNer>
      </div>
      <comPonent :list="list.children"></comPonent>
      <comPone :list="list.children"></comPone>
    </div>
</template>

<script>
import { getErji } from "@/apis/headerList"
import comPonent from "./component.vue"
import comPone from "./compone.vue"
import BanNer from "@/views/Home/components/HomeBanner.vue"
export default {
    components:{
        comPonent,
        comPone,
        BanNer
    },
    data() {
        return {
            list: []
        }
    },
   props:{
    id:{
       type:String,
       default:""
    }
   },
    methods: {
        async getList() {
            let res = await getErji(this.id)
            this.list=res.result
            console.log(res, "erji")
        },
    },
    mounted() {
        console.log(this.id,"erji")
        this.getList()
    },
}
</script>

<style lang="scss" scoped>
.mbx{
    height: 40px;
    line-height: 40px;
    display: flex;
    align-items: center;
}
.banner{
     height: 500px;
}
</style>